//
//  DeviceSystem.swift
//  MyTest
//
//  Created by guanzhongwang on 2021/5/15.
//

import UIKit

class SystemInfo {
    // MARK iOS 版本
    static var Version:String{
        get{UIDevice.current.systemVersion}
    }
    // 设备名称
    static var name:String{
        get{UIDevice.current.systemName}
    }
    // 设备型号
    static var model:String{
        get{UIDevice.current.model}
    }
    // 设备区域化型号
    static var localizedModel:String{
        get{UIDevice.current.localizedModel}
    }
    
    private init(){}
}

extension Bundle{
 var appDisplayName:String{
        guard let name = infoDictionary?["CFBundleDisplayName"] as? String else {
            return ""
        }
        return name
    } // 应用名称
    
    var appVersion:String{
        guard let name = infoDictionary?["CFBundleShortVersionString"] as? String else {
            return ""
        }
        return name
    } // APP版本号
    var buildVersion:String{
        guard let name = infoDictionary?["CFBundleVersion"] as? String else {
            return ""
        }
        return name
    }
}
